home *** CD-ROM | disk | FTP | other *** search
/ Dynamic Graphics Magazine (Alt) / Dynamic Graphics Magazine (Version B).iso / pc / dgm / tutor.dir / 00001.ls next >
Encoding:
Text File  |  1997-03-25  |  549 b   |  24 lines

  1. on hBtnToggle vchannel, vUpBtnNum, vDnBtnNum
  2.   puppetSound("CLICK")
  3.   updateStage()
  4.   puppetSprite(vchannel, 1)
  5.   repeat while the mouseDown
  6.     set vClickState to setBtn(vchannel, vUpBtnNum, vDnBtnNum)
  7.     updateStage()
  8.   end repeat
  9.   puppetSprite(vchannel, 0)
  10.   puppetSound(0)
  11.   return vClickState
  12. end
  13.  
  14. on setBtn vchannel, vUpBtnNum, vDnBtnNum
  15.   if rollOver(vchannel) then
  16.     set the castNum of sprite vchannel to vDnBtnNum
  17.     set flag to 1
  18.   else
  19.     set the castNum of sprite vchannel to vUpBtnNum
  20.     set flag to 0
  21.   end if
  22.   return flag
  23. end
  24.